package com.nf.service;

import com.nf.dao.UserDao;
import com.nf.entity.User;

public class UserServiceImpl implements UserService{
    //需要调用Dao  就定义UserDao的接口为属性
    private UserDao userDao=null;

    public UserDao getUserDao() {

        return userDao;
    }
    public void setUserDao(UserDao userDao){

        this.userDao=userDao;
    }


    public String getUserNameById(String id) {
        User user = userDao.getUserById(id);
        if ("5*9**1".equals(user.getUserPassword())) {
            return user.getUserName() + "5*9**1";
        } else {
            return user.getUserName();
        }
      }
}
